<?php
namespace app\common\model;

use think\Model;

/**  TX
 *   区域合伙人、城市合伙人提现订单模型
 *   Date: 2020/5/21
 * Class OaCashOrderModel
 * @package app\common\model
 */
class AdminCashOrderModel extends Model
{
    // 表名
    protected $name = 'admin_cash_order';

    // 单条查询
    public function getOne($where=[],$field='*',$join=[])
    {
        $result = $this->alias('a')->where($where)->join($join)
            ->field($field)
            ->find();
        return $result;
    }

    // 单表列表查询
    public function getAll($where=[],$field='*',$page=1,$pageSize=999,$order='',$group='')
    {
        if($pageSize>0){//分页
            $result = $this->where($where)
                ->field($field)
                ->page($page, $pageSize)
                ->order($order)
                ->group($group)
                ->select();
        }else{//不分页
            $result = $this->where($where)
                ->field($field)
                ->order($order)
                ->group($group)
                ->select();
        }
        return $result;

    }





}